From: Adel Gadllah Date: Sat, 4 Feb 2012 15:56:16 +0000 (+0100) Subject: screenGrabber: Pass correct coordinates to glReadPixels X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7107 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=87559414a39370ffcddb735ed54e9fa4fab1963f;p=gnome-shell.git screenGrabber: Pass correct coordinates to glReadPixels Pass x and y to glReadPixels rather then always 0, 0. https://bugzilla.gnome.org/show_bug.cgi?id=669366 --- diff --git a/src/shell-screen-grabber.c b/src/shell-screen-grabber.c index 283e23479..f8ddaa179 100644 --- a/src/shell-screen-grabber.c +++ b/src/shell-screen-grabber.c @@ -165,7 +165,7 @@ shell_screen_grabber_grab (ShellScreenGrabber *grabber, pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, grabber->pixel_buffer); } - glReadPixels (0, 0, width, height, GL_BGRA, GL_UNSIGNED_BYTE, 0); + glReadPixels (x, y, width, height, GL_BGRA, GL_UNSIGNED_BYTE, 0); mapped_data = pf_glMapBufferARB (GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY_ARB);